package com.xinghou.platform.server.api.bussiness;

import com.xinghou.platform.entity.req.ListReq;
import com.xinghou.platform.entity.resp.UserInfoResp;
import com.xinghou.platform.model.main.UserInvite;

import java.util.List;

/**
 * Created by qingshengzheng on 16/9/9.
 */
public interface UserInviteService {

    /**
     * 用户抽奖
     */
    public void drawPrize(Integer uid);
    /**
     * 判断用户是否具备抽奖资格
     */
    public boolean canDrawPrize(Integer uid);

    /**
     * 抽奖算法
     */
    public int drawResult(Integer uid);

    /**
     * 获取用户邀请码
     */
    public String getInviteCodeByUser(Integer userid);

    /**
     * 根据邀请码获得用户id
     */
    public Integer getUserByInviteCode(String invite);


    /**
     * 根据邀请码获得用户id
     */
    public void addUserInvite(UserInvite userInvite);

    /**
     * 根据邀请码获得用户id
     */
    public List<UserInfoResp> getRank(Integer userid);

    public List<UserInfoResp> getInvitedUser(ListReq listReq);

    public UserInfoResp getIndexAndScoreByUser(Integer userid);
}
